feat: standalone CLI mode — browser-based Pixel Agents#1
Merged
dzhamirag-cloud merged 1 commit intomainfrom Mar 11, 2026
Merged
feat: standalone CLI mode — browser-based Pixel Agents#1dzhamirag-cloud merged 1 commit intomainfrom
dzhamirag-cloud merged 1 commit intomainfrom
Conversation
Add cli/ directory with standalone HTTP + WebSocket server that serves the pixel office in a regular browser window, without requiring VS Code. Architecture: - cli/main.ts — entry point, parses args, opens browser - cli/server.ts — HTTP static file server + WebSocket on /ws - cli/cliOrchestrator.ts — replaces PixelAgentsViewProvider, broadcasts via WS - cli/sessionScanner.ts — auto-detects Claude Code sessions in ~/.claude/projects/ - cli/persistence.ts — seats/settings stored in ~/.pixel-agents/ - cli/vscode-stub.ts — minimal vscode API shim for bundling Frontend changes: - webview-ui/src/vscodeApi.ts — auto-detect VS Code vs browser, WebSocket bridge with auto-reconnect and state resync on reconnect - BottomToolbar.tsx — show hint text instead of + Agent button in CLI mode - SettingsModal.tsx — browser file picker for layout import/export in CLI mode Backend changes: - src/types.ts — terminalRef now optional (CLI agents have no terminal) - src/agentManager.ts — skip CLI agents in persistAgents - src/PixelAgentsViewProvider.ts — null-guard all terminalRef usages Build: - esbuild.js — new --cli flag builds dist/cli.js with vscode stub alias - package.json — add bin, start, build:cli scripts; ws dependency Usage: npm run build:cli npm start # or: node dist/cli.js --port 7842
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds standalone CLI mode that serves the pixel office in a regular browser window, without requiring VS Code.
New files (cli/)
cli/main.ts— entry point, arg parsing, auto-opens browsercli/server.ts— HTTP + WebSocket server (plain Node.js)cli/cliOrchestrator.ts— replaces PixelAgentsViewProvider, broadcasts via WScli/sessionScanner.ts— auto-detects Claude Code sessions in~/.claude/projects/cli/persistence.ts— seats/settings stored in~/.pixel-agents/cli/vscode-stub.ts— minimal vscode API shimModified files
vscodeApi.ts— auto-detect VS Code vs browser, WebSocket bridge with reconnect + state resyncBottomToolbar.tsx— hint text in CLI mode instead of + Agent buttonSettingsModal.tsx— browser file picker for layout import/exporttypes.ts—terminalRefnow optionalagentManager.ts— skip CLI agents inpersistAgentsPixelAgentsViewProvider.ts— null-guard allterminalRefusagesesbuild.js—--cliflag for CLI buildpackage.json—bin,start,build:cliscriptsUsage
npm run build:cli npm start # or: node dist/cli.js --port 7842Based on
Inspired by PR pablodelucca#63 with bug fixes:
webviewReadyon reconnect (fixes blank UI)import.meta.urlfallback for ESM compatibility